package com.base.data.message
{
	import com.base.util.Utils;
	
	import mx.collections.ArrayCollection;

	/**
	 * 房屋类型,装修情况,建筑结构,房屋朝向等。 
	 * @author Administrator
	 */	
	public class HouseType1
	{
		/**
		 *房屋外貌 
		 */		
		[Bindable]
		public static var AppearanceList:ArrayCollection  =  new ArrayCollection([
				{label:"普通住宅",data:1}
				,{label:"公寓",data:2}
				,{label:"别墅",data:3}
				,{label:"平房",data:4}
			]);
		
		
		
		/**
		 *建筑结构
		 */		
		[Bindable]
		public static var StructureList:ArrayCollection  =  new ArrayCollection([
				{ label:"板楼",data:1 }
				,{ label:"塔楼" ,data:2 }
				,{ label:"板塔结合",data:3 }
			]);
		
		/**
		 *装修程度 
		 */		
		[Bindable]
		public static var FitmentList:ArrayCollection  =  new ArrayCollection([    
				{ label:"毛坯",data:1 }
				,{ label:"简单装修",data:2 }
				,{ label:"中等装修",data:3 }
				,{ label:"精装修",data:4 }
				,{ label:"豪华装修",data:5 }
			]);
		
		/**
		 *朝向
		 */		
		[Bindable]
		public static var DirectionList:ArrayCollection  =  new ArrayCollection([
				{label:"东",data:1}
				,{label:"南",data:2}
				,{label:"西",data:3}
				,{label:"北",data:4}
				,{label:"南北",data:5}
				,{label:"东西",data:6}
				,{label:"东南",data:7}
				,{label:"西南",data:8}
				,{label:"东北",data:9}
				,{label:"西北",data:10}
			]);
		/**
		 *房屋外貌 appearanceList
		 */
		private var _appearance:uint;
		/**
		 *建筑结构  structureList
		 */
		private var _structure:uint;
		/**
		 *装修情况  fitmentList
		 */
		private var _fitment:uint;
		/**
		 *朝向 directionList
		 */
		private var _direction:uint;
		
		public function HouseType1( )
		{
			
		}
		
		/**
		 *房屋外貌 AppearanceList
		 */
		public function get appearance():uint
		{
			return _appearance;
		}
		
		/**
		 *房屋外貌 AppearanceList
		 */
		public function set appearance(value:uint):void
		{
			var item:Object = Utils.findDataByArray( AppearanceList , value );
			if( !item ) {
				throw new Error("请输入正确的房屋外貌");
				return;
			}
			_appearance = value;
		}
		
		/**
		 *建筑结构  StructureList
		 */
		public function get structure():uint
		{
			return _structure;
		}

		/**
		 *建筑结构  StructureList
		 */
		public function set structure(value:uint):void
		{
			var item:Object = Utils.findDataByArray( StructureList , value );
			if( !item ) {
				throw new Error("请输入正确的建筑结构");
				return;
			}
			_structure = value;
		}

		/**
		 *装修情况  FitmentList
		 */
		public function get fitment():uint
		{
			return _fitment;
		}

		/**
		 *装修情况  FitmentList
		 */
		public function set fitment(value:uint):void
		{
			var item:Object = Utils.findDataByArray( FitmentList , value );
			if( !item ) {
				throw new Error("请输入正确的装修情况");
				return;
			}
			_fitment = value;
		}

		/**
		 *朝向 DirectionList
		 */
		public function get direction():uint
		{
			return _direction;
		}

		/**
		 * 朝向 DirectionList
		 */
		public function set direction(value:uint):void
		{
			var item:Object = Utils.findDataByArray( DirectionList , value );
			if( !item ) {
				throw new Error("请输入正确的朝向");
				return;
			}
			_direction = value;
		}
		

	}
}